\hypertarget{group__pwm__api}{
\section{Pwm\_\-api}
\label{group__pwm__api}\index{Pwm\_\-api@{Pwm\_\-api}}
}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__pwm__api_ga7fa2c9868b0c6fe74c9a90ade752130a}{
\#define {\bfseries PWM\_\-GEN\_\-BADDR}(\_\-mod\_\-, \_\-gen\_\-)~((\_\-mod\_\-) + (\_\-gen\_\-))}
\label{group__pwm__api_ga7fa2c9868b0c6fe74c9a90ade752130a}

\item 
\#define {\bfseries PWM\_\-GEN\_\-EXT\_\-BADDR}(\_\-mod\_\-, \_\-gen\_\-)
\item 
\hypertarget{group__pwm__api_ga4563e3820191c9d6e73156340b715264}{
\#define {\bfseries PWM\_\-OUT\_\-BADDR}(\_\-mod\_\-, \_\-out\_\-)~((\_\-mod\_\-) + ((\_\-out\_\-) \& 0xFFFFFFC0))}
\label{group__pwm__api_ga4563e3820191c9d6e73156340b715264}

\item 
\hypertarget{group__pwm__api_ga7904efa054c5e221ee9aa2e438f37100}{
\#define {\bfseries PWM\_\-IS\_\-OUTPUT\_\-ODD}(\_\-out\_\-)~((\_\-out\_\-) \& 0x00000001)}
\label{group__pwm__api_ga7904efa054c5e221ee9aa2e438f37100}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__pwm__api_gadf1b23c839a7337e4fa4efd47669135a}{PWMGenConfigure} (unsigned long ulBase, unsigned long ulGen, unsigned long ulConfig)
\item 
void \hyperlink{group__pwm__api_ga53fe756598fda3f5b4afafbe8a900fc2}{PWMGenPeriodSet} (unsigned long ulBase, unsigned long ulGen, unsigned long ulPeriod)
\item 
unsigned long \hyperlink{group__pwm__api_ga49e16a0648dd54ddd14c948f8c011734}{PWMGenPeriodGet} (unsigned long ulBase, unsigned long ulGen)
\item 
void \hyperlink{group__pwm__api_ga37b099417026d91add1aa07e850088b8}{PWMGenEnable} (unsigned long ulBase, unsigned long ulGen)
\item 
void \hyperlink{group__pwm__api_ga93d24bf3453c79be6c7f2823c61d70b8}{PWMGenDisable} (unsigned long ulBase, unsigned long ulGen)
\item 
void \hyperlink{group__pwm__api_ga3779960d8c5bcd8d08429e98d80b0c8c}{PWMPulseWidthSet} (unsigned long ulBase, unsigned long ulPWMOut, unsigned long ulWidth)
\item 
unsigned long \hyperlink{group__pwm__api_gaff20b2ceea2111e4bab3accacb8f18aa}{PWMPulseWidthGet} (unsigned long ulBase, unsigned long ulPWMOut)
\item 
void \hyperlink{group__pwm__api_ga05dfdf4ebe1b8fb4381fb634a4662ba8}{PWMDeadBandEnable} (unsigned long ulBase, unsigned long ulGen, unsigned short usRise, unsigned short usFall)
\item 
void \hyperlink{group__pwm__api_ga809105c104fa4772dbd67d52a06eebbe}{PWMDeadBandDisable} (unsigned long ulBase, unsigned long ulGen)
\item 
void \hyperlink{group__pwm__api_gabf6b675782a44e39a34df4e2b5492727}{PWMSyncUpdate} (unsigned long ulBase, unsigned long ulGenBits)
\item 
void \hyperlink{group__pwm__api_ga90d6c30a4f41b6fbdd0e56c95120a2d3}{PWMSyncTimeBase} (unsigned long ulBase, unsigned long ulGenBits)
\item 
void \hyperlink{group__pwm__api_gaa01ddfdb564bbdacb18b038999b211d3}{PWMOutputState} (unsigned long ulBase, unsigned long ulPWMOutBits, tBoolean bEnable)
\item 
void \hyperlink{group__pwm__api_gab16b2531ade4ff3d6ff633a7a4c5c852}{PWMOutputInvert} (unsigned long ulBase, unsigned long ulPWMOutBits, tBoolean bInvert)
\item 
void \hyperlink{group__pwm__api_gaa3a3645fcaf45feeb939a76a74fbecdd}{PWMOutputFaultLevel} (unsigned long ulBase, unsigned long ulPWMOutBits, tBoolean bDriveHigh)
\item 
void \hyperlink{group__pwm__api_gaa365b7b32d86ad21e25c928137e00f91}{PWMOutputFault} (unsigned long ulBase, unsigned long ulPWMOutBits, tBoolean bFaultSuppress)
\item 
void \hyperlink{group__pwm__api_ga174cef293bd327cb16be53376c524185}{PWMGenIntRegister} (unsigned long ulBase, unsigned long ulGen, void($\ast$pfnIntHandler)(void))
\item 
void \hyperlink{group__pwm__api_ga8e27f2e4dbf533bec5b8220b816f428c}{PWMGenIntUnregister} (unsigned long ulBase, unsigned long ulGen)
\item 
void \hyperlink{group__pwm__api_ga92dc241ff818afaaeb202962558869e4}{PWMFaultIntRegister} (unsigned long ulBase, void($\ast$pfnIntHandler)(void))
\item 
void \hyperlink{group__pwm__api_gac76c29fe316950c16b8e7e9327af518e}{PWMFaultIntUnregister} (unsigned long ulBase)
\item 
void \hyperlink{group__pwm__api_gabc630912b7464202f0cf4eb17219583e}{PWMGenIntTrigEnable} (unsigned long ulBase, unsigned long ulGen, unsigned long ulIntTrig)
\item 
void \hyperlink{group__pwm__api_ga2b96fd7b2bd95e67346a7ff510be257e}{PWMGenIntTrigDisable} (unsigned long ulBase, unsigned long ulGen, unsigned long ulIntTrig)
\item 
unsigned long \hyperlink{group__pwm__api_gad341d8f02b316faf2f39660b4327f9fd}{PWMGenIntStatus} (unsigned long ulBase, unsigned long ulGen, tBoolean bMasked)
\item 
void \hyperlink{group__pwm__api_ga29b05a409bfebdbd60f06ef0a5d325b6}{PWMGenIntClear} (unsigned long ulBase, unsigned long ulGen, unsigned long ulInts)
\item 
void \hyperlink{group__pwm__api_ga9218388db2fe9a78519bb2622bd59030}{PWMIntEnable} (unsigned long ulBase, unsigned long ulGenFault)
\item 
void \hyperlink{group__pwm__api_gaf3708de5a64fa732454fa029b5561d85}{PWMIntDisable} (unsigned long ulBase, unsigned long ulGenFault)
\item 
void \hyperlink{group__pwm__api_ga3ebf062d4066458243f8706b9a55a492}{PWMFaultIntClear} (unsigned long ulBase)
\item 
unsigned long \hyperlink{group__pwm__api_ga6ed8171c9068384a3090288f9291ca42}{PWMIntStatus} (unsigned long ulBase, tBoolean bMasked)
\item 
void \hyperlink{group__pwm__api_gaf3e6af29108d9084ebd9cf101b153dec}{PWMFaultIntClearExt} (unsigned long ulBase, unsigned long ulFaultInts)
\item 
void \hyperlink{group__pwm__api_ga3a10976ac727151facb132cddc5beb5b}{PWMGenFaultConfigure} (unsigned long ulBase, unsigned long ulGen, unsigned long ulMinFaultPeriod, unsigned long ulFaultSenses)
\item 
void \hyperlink{group__pwm__api_ga8c057dd239309f365306d6a410501dd6}{PWMGenFaultTriggerSet} (unsigned long ulBase, unsigned long ulGen, unsigned long ulGroup, unsigned long ulFaultTriggers)
\item 
unsigned long \hyperlink{group__pwm__api_ga3ebf4b86875441603d69ca72ea8756a4}{PWMGenFaultTriggerGet} (unsigned long ulBase, unsigned long ulGen, unsigned long ulGroup)
\item 
unsigned long \hyperlink{group__pwm__api_ga199cb59269316e1898abdcc69677b488}{PWMGenFaultStatus} (unsigned long ulBase, unsigned long ulGen, unsigned long ulGroup)
\item 
void \hyperlink{group__pwm__api_ga4051f1affc2fd4e1f77462051445ba70}{PWMGenFaultClear} (unsigned long ulBase, unsigned long ulGen, unsigned long ulGroup, unsigned long ulFaultTriggers)
\end{DoxyCompactItemize}


\subsection{Define Documentation}
\hypertarget{group__pwm__api_gaf81b183094f6f00cb1108caec1d91e6b}{
\index{pwm\_\-api@{pwm\_\-api}!PWM\_\-GEN\_\-EXT\_\-BADDR@{PWM\_\-GEN\_\-EXT\_\-BADDR}}
\index{PWM\_\-GEN\_\-EXT\_\-BADDR@{PWM\_\-GEN\_\-EXT\_\-BADDR}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWM\_\-GEN\_\-EXT\_\-BADDR}]{\setlength{\rightskip}{0pt plus 5cm}\#define PWM\_\-GEN\_\-EXT\_\-BADDR(
\begin{DoxyParamCaption}
\item[{}]{\_\-mod\_\-, }
\item[{}]{\_\-gen\_\-}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gaf81b183094f6f00cb1108caec1d91e6b}
{\bfseries Value:}
\begin{DoxyCode}
((_mod_) + PWM_GEN_EXT_0 +                    \
                                 ((_gen_) - PWM_GEN_0) * 2)
\end{DoxyCode}


\subsection{Function Documentation}
\hypertarget{group__pwm__api_ga809105c104fa4772dbd67d52a06eebbe}{
\index{pwm\_\-api@{pwm\_\-api}!PWMDeadBandDisable@{PWMDeadBandDisable}}
\index{PWMDeadBandDisable@{PWMDeadBandDisable}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMDeadBandDisable}]{\setlength{\rightskip}{0pt plus 5cm}void PWMDeadBandDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga809105c104fa4772dbd67d52a06eebbe}
Disables the PWM dead band output.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to modify. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}.\end{DoxyParams}
This function disables the dead band mode for the specified PWM generator. Doing so decouples the {\bfseries OutA} and {\bfseries OutB} signals.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga05dfdf4ebe1b8fb4381fb634a4662ba8}{
\index{pwm\_\-api@{pwm\_\-api}!PWMDeadBandEnable@{PWMDeadBandEnable}}
\index{PWMDeadBandEnable@{PWMDeadBandEnable}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMDeadBandEnable}]{\setlength{\rightskip}{0pt plus 5cm}void PWMDeadBandEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned short}]{ usRise, }
\item[{unsigned short}]{ usFall}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga05dfdf4ebe1b8fb4381fb634a4662ba8}
Enables the PWM dead band output, and sets the dead band delays.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to modify. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em usRise}]specifies the width of delay from the rising edge. \item[{\em usFall}]specifies the width of delay from the falling edge.\end{DoxyParams}
This function sets the dead bands for the specified PWM generator, where the dead bands are defined as the number of {\bfseries PWM} clock ticks from the rising or falling edge of the generator's {\bfseries OutA} signal. Note that this function causes the coupling of {\bfseries OutB} to {\bfseries OutA}.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga3ebf062d4066458243f8706b9a55a492}{
\index{pwm\_\-api@{pwm\_\-api}!PWMFaultIntClear@{PWMFaultIntClear}}
\index{PWMFaultIntClear@{PWMFaultIntClear}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMFaultIntClear}]{\setlength{\rightskip}{0pt plus 5cm}void PWMFaultIntClear (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga3ebf062d4066458243f8706b9a55a492}
Clears the fault interrupt for a PWM module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module.\end{DoxyParams}
Clears the fault interrupt by writing to the appropriate bit of the interrupt status register for the selected PWM module.

This function clears only the FAULT0 interrupt and is retained for backwards compatibility. It is recommended that \hyperlink{group__pwm__api_gaf3e6af29108d9084ebd9cf101b153dec}{PWMFaultIntClearExt()} be used instead since it supports all fault interrupts supported on devices with and without extended PWM fault handling support.

\begin{DoxyNote}{Note}
Since there is a write buffer in the Cortex-\/M3 processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (since NVIC still sees the interrupt source asserted).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gaf3e6af29108d9084ebd9cf101b153dec}{
\index{pwm\_\-api@{pwm\_\-api}!PWMFaultIntClearExt@{PWMFaultIntClearExt}}
\index{PWMFaultIntClearExt@{PWMFaultIntClearExt}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMFaultIntClearExt}]{\setlength{\rightskip}{0pt plus 5cm}void PWMFaultIntClearExt (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulFaultInts}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gaf3e6af29108d9084ebd9cf101b153dec}
Clears the fault interrupt for a PWM module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulFaultInts}]specifies the fault interrupts to clear.\end{DoxyParams}
Clears one or more fault interrupts by writing to the appropriate bit of the PWM interrupt status register. The parameter {\itshape ulFaultInts\/} must be the logical OR of any of {\bfseries PWM\_\-INT\_\-FAULT0}, {\bfseries PWM\_\-INT\_\-FAULT1}, {\bfseries PWM\_\-INT\_\-FAULT2}, or {\bfseries PWM\_\-INT\_\-FAULT3}.

When running on a device supporting extended PWM fault handling, the fault interrupts are derived by performing a logical OR of each of the configured fault trigger signals for a given generator. Therefore, these interrupts are not directly related to the four possible FAULTn inputs to the device but indicate that a fault has been signaled to one of the four possible PWM generators. On a device without extended PWM fault handling, the interrupt is directly related to the state of the single FAULT pin.

\begin{DoxyNote}{Note}
Since there is a write buffer in the Cortex-\/M3 processor, it may take several cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (since NVIC still sees the interrupt source asserted).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga92dc241ff818afaaeb202962558869e4}{
\index{pwm\_\-api@{pwm\_\-api}!PWMFaultIntRegister@{PWMFaultIntRegister}}
\index{PWMFaultIntRegister@{PWMFaultIntRegister}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMFaultIntRegister}]{\setlength{\rightskip}{0pt plus 5cm}void PWMFaultIntRegister (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{void($\ast$)(void)}]{ pfnIntHandler}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga92dc241ff818afaaeb202962558869e4}
Registers an interrupt handler for a fault condition detected in a PWM module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em pfnIntHandler}]is a pointer to the function to be called when the PWM fault interrupt occurs.\end{DoxyParams}
This function will ensure that the interrupt handler specified by {\itshape pfnIntHandler\/} is called when a fault interrupt is detected for the selected PWM module. This function will also enable the PWM fault interrupt in the NVIC; the PWM fault interrupt must also be enabled at the module level using \hyperlink{group__pwm__api_ga9218388db2fe9a78519bb2622bd59030}{PWMIntEnable()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__interrupt__api_ga471d00d73ae22faa426c202f608e9c69}{IntRegister()} for important information about registering interrupt handlers.
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gac76c29fe316950c16b8e7e9327af518e}{
\index{pwm\_\-api@{pwm\_\-api}!PWMFaultIntUnregister@{PWMFaultIntUnregister}}
\index{PWMFaultIntUnregister@{PWMFaultIntUnregister}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMFaultIntUnregister}]{\setlength{\rightskip}{0pt plus 5cm}void PWMFaultIntUnregister (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gac76c29fe316950c16b8e7e9327af518e}
Removes the PWM fault condition interrupt handler.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module.\end{DoxyParams}
This function will remove the interrupt handler for a PWM fault interrupt from the selected PWM module. This function will also disable the PWM fault interrupt in the NVIC; the PWM fault interrupt must also be disabled at the module level using \hyperlink{group__pwm__api_gaf3708de5a64fa732454fa029b5561d85}{PWMIntDisable()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__interrupt__api_ga471d00d73ae22faa426c202f608e9c69}{IntRegister()} for important information about registering interrupt handlers.
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gadf1b23c839a7337e4fa4efd47669135a}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenConfigure@{PWMGenConfigure}}
\index{PWMGenConfigure@{PWMGenConfigure}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenConfigure}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenConfigure (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulConfig}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gadf1b23c839a7337e4fa4efd47669135a}
Configures a PWM generator.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to configure. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulConfig}]is the configuration for the PWM generator.\end{DoxyParams}
This function is used to set the mode of operation for a PWM generator. The counting mode, synchronization mode, and debug behavior are all configured. After configuration, the generator is left in the disabled state.

A PWM generator can count in two different modes: count down mode or count up/down mode. In count down mode, it will count from a value down to zero, and then reset to the preset value. This will produce left-\/aligned PWM signals (that is the rising edge of the two PWM signals produced by the generator will occur at the same time). In count up/down mode, it will count up from zero to the preset value, count back down to zero, and then repeat the process. This will produce center-\/aligned PWM signals (that is, the middle of the high/low period of the PWM signals produced by the generator will occur at the same time).

When the PWM generator parameters (period and pulse width) are modified, their affect on the output PWM signals can be delayed. In synchronous mode, the parameter updates are not applied until a synchronization event occurs. This allows multiple parameters to be modified and take affect simultaneously, instead of one at a time. Additionally, parameters to multiple PWM generators in synchronous mode can be updated simultaneously, allowing them to be treated as if they were a unified generator. In non-\/synchronous mode, the parameter updates are not delayed until a synchronization event. In either mode, the parameter updates only occur when the counter is at zero to help prevent oddly formed PWM signals during the update (that is, a PWM pulse that is too short or too long).

The PWM generator can either pause or continue running when the processor is stopped via the debugger. If configured to pause, it will continue to count until it reaches zero, at which point it will pause until the processor is restarted. If configured to continue running, it will keep counting as if nothing had happened.

The {\itshape ulConfig\/} parameter contains the desired configuration. It is the logical OR of the following:


\begin{DoxyItemize}
\item {\bfseries PWM\_\-GEN\_\-MODE\_\-DOWN} or {\bfseries PWM\_\-GEN\_\-MODE\_\-UP\_\-DOWN} to specify the counting mode
\item {\bfseries PWM\_\-GEN\_\-MODE\_\-SYNC} or {\bfseries PWM\_\-GEN\_\-MODE\_\-NO\_\-SYNC} to specify the counter load and comparator update synchronization mode
\item {\bfseries PWM\_\-GEN\_\-MODE\_\-DBG\_\-RUN} or {\bfseries PWM\_\-GEN\_\-MODE\_\-DBG\_\-STOP} to specify the debug behavior
\item {\bfseries PWM\_\-GEN\_\-MODE\_\-GEN\_\-NO\_\-SYNC}, {\bfseries PWM\_\-GEN\_\-MODE\_\-GEN\_\-SYNC\_\-LOCAL}, or {\bfseries PWM\_\-GEN\_\-MODE\_\-GEN\_\-SYNC\_\-GLOBAL} to specify the update synchronization mode for generator counting mode changes
\item {\bfseries PWM\_\-GEN\_\-MODE\_\-DB\_\-NO\_\-SYNC}, {\bfseries PWM\_\-GEN\_\-MODE\_\-DB\_\-SYNC\_\-LOCAL}, or {\bfseries PWM\_\-GEN\_\-MODE\_\-DB\_\-SYNC\_\-GLOBAL} to specify the deadband parameter synchronization mode
\item {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-LATCHED} or {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-UNLATCHED} to specify whether fault conditions are latched or not
\item {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-MINPER} or {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-NO\_\-MINPER} to specify whether minimum fault period support is required
\item {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-EXT} or {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-LEGACY} to specify whether extended fault source selection support is enabled or not
\end{DoxyItemize}

Setting {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-MINPER} allows an application to set the minimum duration of a PWM fault signal. Fault will be signaled for at least this time even if the external fault pin deasserts earlier. Care should be taken when using this mode since during the fault signal period, the fault interrupt from the PWM generator will remain asserted. The fault interrupt handler may, therefore, reenter immediately if it exits prior to expiration of the fault timer.

\begin{DoxyNote}{Note}
Changes to the counter mode will affect the period of the PWM signals produced. \hyperlink{group__pwm__api_ga53fe756598fda3f5b4afafbe8a900fc2}{PWMGenPeriodSet()} and \hyperlink{group__pwm__api_ga3779960d8c5bcd8d08429e98d80b0c8c}{PWMPulseWidthSet()} should be called after any changes to the counter mode of a generator.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga93d24bf3453c79be6c7f2823c61d70b8}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenDisable@{PWMGenDisable}}
\index{PWMGenDisable@{PWMGenDisable}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenDisable}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga93d24bf3453c79be6c7f2823c61d70b8}
Disables the timer/counter for a PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to be disabled. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}.\end{DoxyParams}
This function blocks the PWM clock from driving the timer/counter for the specified generator block.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga37b099417026d91add1aa07e850088b8}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenEnable@{PWMGenEnable}}
\index{PWMGenEnable@{PWMGenEnable}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenEnable}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga37b099417026d91add1aa07e850088b8}
Enables the timer/counter for a PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to be enabled. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}.\end{DoxyParams}
This function allows the PWM clock to drive the timer/counter for the specified generator block.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga4051f1affc2fd4e1f77462051445ba70}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenFaultClear@{PWMGenFaultClear}}
\index{PWMGenFaultClear@{PWMGenFaultClear}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenFaultClear}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenFaultClear (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulGroup, }
\item[{unsigned long}]{ ulFaultTriggers}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga4051f1affc2fd4e1f77462051445ba70}
Clears one or more latched fault triggers for a given PWM generator.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator whose fault trigger states are being queried. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulGroup}]indicates the subset of faults that are being queried. This must be {\bfseries PWM\_\-FAULT\_\-GROUP\_\-0}. \item[{\em ulFaultTriggers}]is the set of fault triggers which are to be cleared.\end{DoxyParams}
This function allows an application to clear the fault triggers for a given PWM generator. This is only required if \hyperlink{group__pwm__api_gadf1b23c839a7337e4fa4efd47669135a}{PWMGenConfigure()} has previously been called with flag {\bfseries PWM\_\-GEN\_\-MODE\_\-LATCH\_\-FAULT} in parameter {\itshape ulConfig\/}.

\begin{DoxyNote}{Note}
This function is only available on devices supporting extended PWM fault handling.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga3a10976ac727151facb132cddc5beb5b}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenFaultConfigure@{PWMGenFaultConfigure}}
\index{PWMGenFaultConfigure@{PWMGenFaultConfigure}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenFaultConfigure}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenFaultConfigure (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulMinFaultPeriod, }
\item[{unsigned long}]{ ulFaultSenses}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga3a10976ac727151facb132cddc5beb5b}
Configures the minimum fault period and fault pin senses for a given PWM generator.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator whose fault configuration is being set. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulMinFaultPeriod}]is the minimum fault active period expressed in PWM clock cycles. \item[{\em ulFaultSenses}]indicates which sense of each FAULT input should be considered the ``asserted'' state. Valid values are logical OR combinations of {\bfseries PWM\_\-FAULTn\_\-SENSE\_\-HIGH} and {\bfseries PWM\_\-FAULTn\_\-SENSE\_\-LOW}.\end{DoxyParams}
This function sets the minimum fault period for a given generator along with the sense of each of the 4 possible fault inputs. The minimum fault period is expressed in PWM clock cycles and takes effect only if \hyperlink{group__pwm__api_gadf1b23c839a7337e4fa4efd47669135a}{PWMGenConfigure()} is called with flag {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-PER} set in the {\itshape ulConfig\/} parameter. When a fault input is asserted, the minimum fault period timer ensures that it remains asserted for at least the number of clock cycles specified.

\begin{DoxyNote}{Note}
This function is only available on devices supporting extended PWM fault handling.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga199cb59269316e1898abdcc69677b488}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenFaultStatus@{PWMGenFaultStatus}}
\index{PWMGenFaultStatus@{PWMGenFaultStatus}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenFaultStatus}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long PWMGenFaultStatus (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulGroup}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga199cb59269316e1898abdcc69677b488}
Returns the current state of the fault triggers for a given PWM generator.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator whose fault trigger states are being queried. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulGroup}]indicates the subset of faults that are being queried. This must be {\bfseries PWM\_\-FAULT\_\-GROUP\_\-0}.\end{DoxyParams}
This function allows an application to query the current state of each of the fault trigger inputs to a given PWM generator. The current state of each fault trigger input is returned unless \hyperlink{group__pwm__api_gadf1b23c839a7337e4fa4efd47669135a}{PWMGenConfigure()} has previously been called with flag {\bfseries PWM\_\-GEN\_\-MODE\_\-LATCH\_\-FAULT} in the {\itshape ulConfig\/} parameter in which case the returned status is the latched fault trigger status.

If latched faults are configured, the application must call \hyperlink{group__pwm__api_ga4051f1affc2fd4e1f77462051445ba70}{PWMGenFaultClear()} to clear each trigger.

\begin{DoxyNote}{Note}
This function is only available on devices supporting extended PWM fault handling.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Returns the current state of the fault triggers for the given PWM generator. A set bit indicates that the associated trigger is active. For {\bfseries PWM\_\-FAULT\_\-GROUP\_\-0}, the returned value will be a logical OR of {\bfseries PWM\_\-FAULT\_\-FAULT0}, {\bfseries PWM\_\-FAULT\_\-FAULT1}, {\bfseries PWM\_\-FAULT\_\-FAULT2}, or {\bfseries PWM\_\-FAULT\_\-FAULT3}. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga3ebf4b86875441603d69ca72ea8756a4}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenFaultTriggerGet@{PWMGenFaultTriggerGet}}
\index{PWMGenFaultTriggerGet@{PWMGenFaultTriggerGet}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenFaultTriggerGet}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long PWMGenFaultTriggerGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulGroup}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga3ebf4b86875441603d69ca72ea8756a4}
Returns the set of fault triggers currently configured for a given PWM generator.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator whose fault triggers are being queried. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulGroup}]indicates the subset of faults that are being queried. This must be {\bfseries PWM\_\-FAULT\_\-GROUP\_\-0}.\end{DoxyParams}
This function allows an application to query the current set of inputs that contribute towards the generation of a fault condition to a given PWM generator.

\begin{DoxyNote}{Note}
This function is only available on devices supporting extended PWM fault handling.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
Returns the current fault triggers configured for the fault group provided. For {\bfseries PWM\_\-FAULT\_\-GROUP\_\-0}, the returned value will be a logical OR of {\bfseries PWM\_\-FAULT\_\-FAULT0}, {\bfseries PWM\_\-FAULT\_\-FAULT1}, {\bfseries PWM\_\-FAULT\_\-FAULT2}, or {\bfseries PWM\_\-FAULT\_\-FAULT3}. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga8c057dd239309f365306d6a410501dd6}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenFaultTriggerSet@{PWMGenFaultTriggerSet}}
\index{PWMGenFaultTriggerSet@{PWMGenFaultTriggerSet}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenFaultTriggerSet}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenFaultTriggerSet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulGroup, }
\item[{unsigned long}]{ ulFaultTriggers}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga8c057dd239309f365306d6a410501dd6}
Configures the set of fault triggers for a given PWM generator.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator whose fault triggers are being set. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulGroup}]indicates the subset of possible faults that are to be configured. This must be {\bfseries PWM\_\-FAULT\_\-GROUP\_\-0}. \item[{\em ulFaultTriggers}]defines the set of inputs that are to contribute towards generation of the fault signal to the given PWM generator. For {\bfseries PWM\_\-FAULT\_\-GROUP\_\-0}, this will be the logical OR of {\bfseries PWM\_\-FAULT\_\-FAULT0}, {\bfseries PWM\_\-FAULT\_\-FAULT1}, {\bfseries PWM\_\-FAULT\_\-FAULT2}, or {\bfseries PWM\_\-FAULT\_\-FAULT3}.\end{DoxyParams}
This function allows selection of the set of fault inputs that will be combined to generate a fault condition to a given PWM generator. By default, all generators use only FAULT0 (for backwards compatibility) but if \hyperlink{group__pwm__api_gadf1b23c839a7337e4fa4efd47669135a}{PWMGenConfigure()} is called with flag {\bfseries PWM\_\-GEN\_\-MODE\_\-FAULT\_\-SRC} in the {\itshape ulConfig\/} parameter, extended fault handling is enabled and this function must be called to configure the fault triggers.

The fault signal to the PWM generator is generated by ORing together each of the signals whose inputs are specified in the {\itshape ulFaultTriggers\/} parameter after having adjusted the sense of each FAULTn input based on the configuration previously set using a call to \hyperlink{group__pwm__api_ga3a10976ac727151facb132cddc5beb5b}{PWMGenFaultConfigure()}.

\begin{DoxyNote}{Note}
This function is only available on devices supporting extended PWM fault handling.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga29b05a409bfebdbd60f06ef0a5d325b6}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenIntClear@{PWMGenIntClear}}
\index{PWMGenIntClear@{PWMGenIntClear}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenIntClear}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenIntClear (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulInts}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga29b05a409bfebdbd60f06ef0a5d325b6}
Clears the specified interrupt(s) for the specified PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to query. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulInts}]specifies the interrupts to be cleared.\end{DoxyParams}
Clears the specified interrupt(s) by writing a 1 to the specified bits of the interrupt status register for the specified PWM generator. The {\itshape ulInts\/} parameter is the logical OR of {\bfseries PWM\_\-INT\_\-CNT\_\-ZERO}, {\bfseries PWM\_\-INT\_\-CNT\_\-LOAD}, {\bfseries PWM\_\-INT\_\-CNT\_\-AU}, {\bfseries PWM\_\-INT\_\-CNT\_\-AD}, {\bfseries PWM\_\-INT\_\-CNT\_\-BU}, or {\bfseries PWM\_\-INT\_\-CNT\_\-BD}.

\begin{DoxyNote}{Note}
Since there is a write buffer in the Cortex-\/M3 processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (since NVIC still sees the interrupt source asserted).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga174cef293bd327cb16be53376c524185}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenIntRegister@{PWMGenIntRegister}}
\index{PWMGenIntRegister@{PWMGenIntRegister}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenIntRegister}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenIntRegister (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{void($\ast$)(void)}]{ pfnIntHandler}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga174cef293bd327cb16be53376c524185}
Registers an interrupt handler for the specified PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator in question. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em pfnIntHandler}]is a pointer to the function to be called when the PWM generator interrupt occurs.\end{DoxyParams}
This function will ensure that the interrupt handler specified by {\itshape pfnIntHandler\/} is called when an interrupt is detected for the specified PWM generator block. This function will also enable the corresponding PWM generator interrupt in the interrupt controller; individual generator interrupts and interrupt sources must be enabled with \hyperlink{group__pwm__api_ga9218388db2fe9a78519bb2622bd59030}{PWMIntEnable()} and \hyperlink{group__pwm__api_gabc630912b7464202f0cf4eb17219583e}{PWMGenIntTrigEnable()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__interrupt__api_ga471d00d73ae22faa426c202f608e9c69}{IntRegister()} for important information about registering interrupt handlers.
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gad341d8f02b316faf2f39660b4327f9fd}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenIntStatus@{PWMGenIntStatus}}
\index{PWMGenIntStatus@{PWMGenIntStatus}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenIntStatus}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long PWMGenIntStatus (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{tBoolean}]{ bMasked}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gad341d8f02b316faf2f39660b4327f9fd}
Gets interrupt status for the specified PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to query. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em bMasked}]specifies whether masked or raw interrupt status is returned.\end{DoxyParams}
If {\itshape bMasked\/} is set as {\bfseries true}, then the masked interrupt status is returned; otherwise, the raw interrupt status will be returned.

\begin{DoxyReturn}{Returns}
Returns the contents of the interrupt status register, or the contents of the raw interrupt status register, for the specified PWM generator. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga2b96fd7b2bd95e67346a7ff510be257e}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenIntTrigDisable@{PWMGenIntTrigDisable}}
\index{PWMGenIntTrigDisable@{PWMGenIntTrigDisable}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenIntTrigDisable}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenIntTrigDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulIntTrig}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga2b96fd7b2bd95e67346a7ff510be257e}
Disables interrupts for the specified PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to have interrupts and triggers disabled. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulIntTrig}]specifies the interrupts and triggers to be disabled.\end{DoxyParams}
Masks the specified interrupt(s) and trigger(s) by clearing the specified bits of the interrupt/trigger enable register for the specified PWM generator. The {\itshape ulIntTrig\/} parameter is the logical OR of {\bfseries PWM\_\-INT\_\-CNT\_\-ZERO}, {\bfseries PWM\_\-INT\_\-CNT\_\-LOAD}, {\bfseries PWM\_\-INT\_\-CNT\_\-AU}, {\bfseries PWM\_\-INT\_\-CNT\_\-AD}, {\bfseries PWM\_\-INT\_\-CNT\_\-BU}, {\bfseries PWM\_\-INT\_\-CNT\_\-BD}, {\bfseries PWM\_\-TR\_\-CNT\_\-ZERO}, {\bfseries PWM\_\-TR\_\-CNT\_\-LOAD}, {\bfseries PWM\_\-TR\_\-CNT\_\-AU}, {\bfseries PWM\_\-TR\_\-CNT\_\-AD}, {\bfseries PWM\_\-TR\_\-CNT\_\-BU}, or {\bfseries PWM\_\-TR\_\-CNT\_\-BD}.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gabc630912b7464202f0cf4eb17219583e}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenIntTrigEnable@{PWMGenIntTrigEnable}}
\index{PWMGenIntTrigEnable@{PWMGenIntTrigEnable}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenIntTrigEnable}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenIntTrigEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulIntTrig}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gabc630912b7464202f0cf4eb17219583e}
Enables interrupts and triggers for the specified PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to have interrupts and triggers enabled. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulIntTrig}]specifies the interrupts and triggers to be enabled.\end{DoxyParams}
Unmasks the specified interrupt(s) and trigger(s) by setting the specified bits of the interrupt/trigger enable register for the specified PWM generator. The {\itshape ulIntTrig\/} parameter is the logical OR of {\bfseries PWM\_\-INT\_\-CNT\_\-ZERO}, {\bfseries PWM\_\-INT\_\-CNT\_\-LOAD}, {\bfseries PWM\_\-INT\_\-CNT\_\-AU}, {\bfseries PWM\_\-INT\_\-CNT\_\-AD}, {\bfseries PWM\_\-INT\_\-CNT\_\-BU}, {\bfseries PWM\_\-INT\_\-CNT\_\-BD}, {\bfseries PWM\_\-TR\_\-CNT\_\-ZERO}, {\bfseries PWM\_\-TR\_\-CNT\_\-LOAD}, {\bfseries PWM\_\-TR\_\-CNT\_\-AU}, {\bfseries PWM\_\-TR\_\-CNT\_\-AD}, {\bfseries PWM\_\-TR\_\-CNT\_\-BU}, or {\bfseries PWM\_\-TR\_\-CNT\_\-BD}.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga8e27f2e4dbf533bec5b8220b816f428c}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenIntUnregister@{PWMGenIntUnregister}}
\index{PWMGenIntUnregister@{PWMGenIntUnregister}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenIntUnregister}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenIntUnregister (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga8e27f2e4dbf533bec5b8220b816f428c}
Removes an interrupt handler for the specified PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator in question. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}.\end{DoxyParams}
This function will unregister the interrupt handler for the specified PWM generator block. This function will also disable the corresponding PWM generator interrupt in the interrupt controller; individual generator interrupts and interrupt sources must be disabled with \hyperlink{group__pwm__api_gaf3708de5a64fa732454fa029b5561d85}{PWMIntDisable()} and \hyperlink{group__pwm__api_ga2b96fd7b2bd95e67346a7ff510be257e}{PWMGenIntTrigDisable()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__interrupt__api_ga471d00d73ae22faa426c202f608e9c69}{IntRegister()} for important information about registering interrupt handlers.
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga49e16a0648dd54ddd14c948f8c011734}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenPeriodGet@{PWMGenPeriodGet}}
\index{PWMGenPeriodGet@{PWMGenPeriodGet}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenPeriodGet}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long PWMGenPeriodGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga49e16a0648dd54ddd14c948f8c011734}
Gets the period of a PWM generator block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to query. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}.\end{DoxyParams}
This function gets the period of the specified PWM generator block. The period of the generator block is defined as the number of PWM clock ticks between pulses on the generator block zero signal.

If the update of the counter for the specified PWM generator has yet to be completed, the value returned may not be the active period. The value returned is the programmed period, measured in PWM clock ticks.

\begin{DoxyReturn}{Returns}
Returns the programmed period of the specified generator block in PWM clock ticks. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga53fe756598fda3f5b4afafbe8a900fc2}{
\index{pwm\_\-api@{pwm\_\-api}!PWMGenPeriodSet@{PWMGenPeriodSet}}
\index{PWMGenPeriodSet@{PWMGenPeriodSet}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMGenPeriodSet}]{\setlength{\rightskip}{0pt plus 5cm}void PWMGenPeriodSet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGen, }
\item[{unsigned long}]{ ulPeriod}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga53fe756598fda3f5b4afafbe8a900fc2}
Set the period of a PWM generator.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGen}]is the PWM generator to be modified. Must be one of {\bfseries PWM\_\-GEN\_\-0}, {\bfseries PWM\_\-GEN\_\-1}, {\bfseries PWM\_\-GEN\_\-2}, or {\bfseries PWM\_\-GEN\_\-3}. \item[{\em ulPeriod}]specifies the period of PWM generator output, measured in clock ticks.\end{DoxyParams}
This function sets the period of the specified PWM generator block, where the period of the generator block is defined as the number of PWM clock ticks between pulses on the generator block zero signal.

\begin{DoxyNote}{Note}
Any subsequent calls made to this function before an update occurs will cause the previous values to be overwritten.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gaf3708de5a64fa732454fa029b5561d85}{
\index{pwm\_\-api@{pwm\_\-api}!PWMIntDisable@{PWMIntDisable}}
\index{PWMIntDisable@{PWMIntDisable}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMIntDisable}]{\setlength{\rightskip}{0pt plus 5cm}void PWMIntDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGenFault}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gaf3708de5a64fa732454fa029b5561d85}
Disables generator and fault interrupts for a PWM module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGenFault}]contains the interrupts to be disabled. Must be a logical OR of any of {\bfseries PWM\_\-INT\_\-GEN\_\-0}, {\bfseries PWM\_\-INT\_\-GEN\_\-1}, {\bfseries PWM\_\-INT\_\-GEN\_\-2}, {\bfseries PWM\_\-INT\_\-GEN\_\-3}, {\bfseries PWM\_\-INT\_\-FAULT0}, {\bfseries PWM\_\-INT\_\-FAULT1}, {\bfseries PWM\_\-INT\_\-FAULT2}, or {\bfseries PWM\_\-INT\_\-FAULT3}.\end{DoxyParams}
Masks the specified interrupt(s) by clearing the specified bits of the interrupt enable register for the selected PWM module.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga9218388db2fe9a78519bb2622bd59030}{
\index{pwm\_\-api@{pwm\_\-api}!PWMIntEnable@{PWMIntEnable}}
\index{PWMIntEnable@{PWMIntEnable}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMIntEnable}]{\setlength{\rightskip}{0pt plus 5cm}void PWMIntEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGenFault}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga9218388db2fe9a78519bb2622bd59030}
Enables generator and fault interrupts for a PWM module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGenFault}]contains the interrupts to be enabled. Must be a logical OR of any of {\bfseries PWM\_\-INT\_\-GEN\_\-0}, {\bfseries PWM\_\-INT\_\-GEN\_\-1}, {\bfseries PWM\_\-INT\_\-GEN\_\-2}, {\bfseries PWM\_\-INT\_\-GEN\_\-3}, {\bfseries PWM\_\-INT\_\-FAULT0}, {\bfseries PWM\_\-INT\_\-FAULT1}, {\bfseries PWM\_\-INT\_\-FAULT2}, or {\bfseries PWM\_\-INT\_\-FAULT3}.\end{DoxyParams}
Unmasks the specified interrupt(s) by setting the specified bits of the interrupt enable register for the selected PWM module.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga6ed8171c9068384a3090288f9291ca42}{
\index{pwm\_\-api@{pwm\_\-api}!PWMIntStatus@{PWMIntStatus}}
\index{PWMIntStatus@{PWMIntStatus}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMIntStatus}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long PWMIntStatus (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{tBoolean}]{ bMasked}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga6ed8171c9068384a3090288f9291ca42}
Gets the interrupt status for a PWM module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em bMasked}]specifies whether masked or raw interrupt status is returned.\end{DoxyParams}
If {\itshape bMasked\/} is set as {\bfseries true}, then the masked interrupt status is returned; otherwise, the raw interrupt status will be returned.

\begin{DoxyReturn}{Returns}
The current interrupt status, enumerated as a bit field of {\bfseries PWM\_\-INT\_\-GEN\_\-0}, {\bfseries PWM\_\-INT\_\-GEN\_\-1}, {\bfseries PWM\_\-INT\_\-GEN\_\-2}, {\bfseries PWM\_\-INT\_\-GEN\_\-3}, {\bfseries PWM\_\-INT\_\-FAULT0}, {\bfseries PWM\_\-INT\_\-FAULT1}, {\bfseries PWM\_\-INT\_\-FAULT2}, and {\bfseries PWM\_\-INT\_\-FAULT3}. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gaa365b7b32d86ad21e25c928137e00f91}{
\index{pwm\_\-api@{pwm\_\-api}!PWMOutputFault@{PWMOutputFault}}
\index{PWMOutputFault@{PWMOutputFault}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMOutputFault}]{\setlength{\rightskip}{0pt plus 5cm}void PWMOutputFault (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulPWMOutBits, }
\item[{tBoolean}]{ bFaultSuppress}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gaa365b7b32d86ad21e25c928137e00f91}
Specifies the state of PWM outputs in response to a fault condition.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulPWMOutBits}]are the PWM outputs to be modified. Must be the logical OR of any of {\bfseries PWM\_\-OUT\_\-0\_\-BIT}, {\bfseries PWM\_\-OUT\_\-1\_\-BIT}, {\bfseries PWM\_\-OUT\_\-2\_\-BIT}, {\bfseries PWM\_\-OUT\_\-3\_\-BIT}, {\bfseries PWM\_\-OUT\_\-4\_\-BIT}, {\bfseries PWM\_\-OUT\_\-5\_\-BIT}, {\bfseries PWM\_\-OUT\_\-6\_\-BIT}, or {\bfseries PWM\_\-OUT\_\-7\_\-BIT}. \item[{\em bFaultSuppress}]determines if the signal is suppressed or passed through during an active fault condition.\end{DoxyParams}
This function sets the fault handling characteristics of the selected PWM outputs. The outputs are selected using the parameter {\itshape ulPWMOutBits\/}. The parameter {\itshape bFaultSuppress\/} determines the fault handling characteristics for the selected outputs. If {\itshape bFaultSuppress\/} is {\bfseries true}, then the selected outputs will be made inactive. If {\itshape bFaultSuppress\/} is {\bfseries false}, then the selected outputs are unaffected by the detected fault.

On devices supporting extended PWM fault handling, the state the affected output pins are driven to can be configured with \hyperlink{group__pwm__api_gaa3a3645fcaf45feeb939a76a74fbecdd}{PWMOutputFaultLevel()}. If not configured, or if the device does not support extended PWM fault handling, affected outputs will be driven low on a fault condition.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gaa3a3645fcaf45feeb939a76a74fbecdd}{
\index{pwm\_\-api@{pwm\_\-api}!PWMOutputFaultLevel@{PWMOutputFaultLevel}}
\index{PWMOutputFaultLevel@{PWMOutputFaultLevel}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMOutputFaultLevel}]{\setlength{\rightskip}{0pt plus 5cm}void PWMOutputFaultLevel (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulPWMOutBits, }
\item[{tBoolean}]{ bDriveHigh}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gaa3a3645fcaf45feeb939a76a74fbecdd}
Specifies the level of PWM outputs suppressed in response to a fault condition.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulPWMOutBits}]are the PWM outputs to be modified. Must be the logical OR of any of {\bfseries PWM\_\-OUT\_\-0\_\-BIT}, {\bfseries PWM\_\-OUT\_\-1\_\-BIT}, {\bfseries PWM\_\-OUT\_\-2\_\-BIT}, {\bfseries PWM\_\-OUT\_\-3\_\-BIT}, {\bfseries PWM\_\-OUT\_\-4\_\-BIT}, {\bfseries PWM\_\-OUT\_\-5\_\-BIT}, {\bfseries PWM\_\-OUT\_\-6\_\-BIT}, or {\bfseries PWM\_\-OUT\_\-7\_\-BIT}. \item[{\em bDriveHigh}]determines if the signal is driven high or low during an active fault condition.\end{DoxyParams}
This function determines whether a PWM output pin that is suppressed in response to a fault condition will be driven high or low. The affected outputs are selected using the parameter {\itshape ulPWMOutBits\/}. The parameter {\itshape bDriveHigh\/} determines the output level for the pins identified by {\itshape ulPWMOutBits\/}. If {\itshape bDriveHigh\/} is {\bfseries true} then the selected outputs will be driven high when a fault is detected. If it is {\itshape false\/}, the pins will be driven low.

In a fault condition, pins which have not been configured to be suppressed via a call to \hyperlink{group__pwm__api_gaa365b7b32d86ad21e25c928137e00f91}{PWMOutputFault()} are unaffected by this function.

\begin{DoxyNote}{Note}
This function is available only on devices which support extended PWM fault handling.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gab16b2531ade4ff3d6ff633a7a4c5c852}{
\index{pwm\_\-api@{pwm\_\-api}!PWMOutputInvert@{PWMOutputInvert}}
\index{PWMOutputInvert@{PWMOutputInvert}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMOutputInvert}]{\setlength{\rightskip}{0pt plus 5cm}void PWMOutputInvert (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulPWMOutBits, }
\item[{tBoolean}]{ bInvert}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gab16b2531ade4ff3d6ff633a7a4c5c852}
Selects the inversion mode for PWM outputs.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulPWMOutBits}]are the PWM outputs to be modified. Must be the logical OR of any of {\bfseries PWM\_\-OUT\_\-0\_\-BIT}, {\bfseries PWM\_\-OUT\_\-1\_\-BIT}, {\bfseries PWM\_\-OUT\_\-2\_\-BIT}, {\bfseries PWM\_\-OUT\_\-3\_\-BIT}, {\bfseries PWM\_\-OUT\_\-4\_\-BIT}, {\bfseries PWM\_\-OUT\_\-5\_\-BIT}, {\bfseries PWM\_\-OUT\_\-6\_\-BIT}, or {\bfseries PWM\_\-OUT\_\-7\_\-BIT}. \item[{\em bInvert}]determines if the signal is inverted or passed through.\end{DoxyParams}
This function is used to select the inversion mode for the selected PWM outputs. The outputs are selected using the parameter {\itshape ulPWMOutBits\/}. The parameter {\itshape bInvert\/} determines the inversion mode for the selected outputs. If {\itshape bInvert\/} is {\bfseries true}, this function will cause the specified PWM output signals to be inverted, or made active low. If {\itshape bInvert\/} is {\bfseries false}, the specified output will be passed through as is, or be made active high.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gaa01ddfdb564bbdacb18b038999b211d3}{
\index{pwm\_\-api@{pwm\_\-api}!PWMOutputState@{PWMOutputState}}
\index{PWMOutputState@{PWMOutputState}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMOutputState}]{\setlength{\rightskip}{0pt plus 5cm}void PWMOutputState (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulPWMOutBits, }
\item[{tBoolean}]{ bEnable}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gaa01ddfdb564bbdacb18b038999b211d3}
Enables or disables PWM outputs.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulPWMOutBits}]are the PWM outputs to be modified. Must be the logical OR of any of {\bfseries PWM\_\-OUT\_\-0\_\-BIT}, {\bfseries PWM\_\-OUT\_\-1\_\-BIT}, {\bfseries PWM\_\-OUT\_\-2\_\-BIT}, {\bfseries PWM\_\-OUT\_\-3\_\-BIT}, {\bfseries PWM\_\-OUT\_\-4\_\-BIT}, {\bfseries PWM\_\-OUT\_\-5\_\-BIT}, {\bfseries PWM\_\-OUT\_\-6\_\-BIT}, or {\bfseries PWM\_\-OUT\_\-7\_\-BIT}. \item[{\em bEnable}]determines if the signal is enabled or disabled.\end{DoxyParams}
This function is used to enable or disable the selected PWM outputs. The outputs are selected using the parameter {\itshape ulPWMOutBits\/}. The parameter {\itshape bEnable\/} determines the state of the selected outputs. If {\itshape bEnable\/} is {\bfseries true}, then the selected PWM outputs are enabled, or placed in the active state. If {\itshape bEnable\/} is {\bfseries false}, then the selected outputs are disabled, or placed in the inactive state.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gaff20b2ceea2111e4bab3accacb8f18aa}{
\index{pwm\_\-api@{pwm\_\-api}!PWMPulseWidthGet@{PWMPulseWidthGet}}
\index{PWMPulseWidthGet@{PWMPulseWidthGet}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMPulseWidthGet}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long PWMPulseWidthGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulPWMOut}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gaff20b2ceea2111e4bab3accacb8f18aa}
Gets the pulse width of a PWM output.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulPWMOut}]is the PWM output to query. Must be one of {\bfseries PWM\_\-OUT\_\-0}, {\bfseries PWM\_\-OUT\_\-1}, {\bfseries PWM\_\-OUT\_\-2}, {\bfseries PWM\_\-OUT\_\-3}, {\bfseries PWM\_\-OUT\_\-4}, {\bfseries PWM\_\-OUT\_\-5}, {\bfseries PWM\_\-OUT\_\-6}, or {\bfseries PWM\_\-OUT\_\-7}.\end{DoxyParams}
This function gets the currently programmed pulse width for the specified PWM output. If the update of the comparator for the specified output has yet to be completed, the value returned may not be the active pulse width. The value returned is the programmed pulse width, measured in PWM clock ticks.

\begin{DoxyReturn}{Returns}
Returns the width of the pulse in PWM clock ticks. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga3779960d8c5bcd8d08429e98d80b0c8c}{
\index{pwm\_\-api@{pwm\_\-api}!PWMPulseWidthSet@{PWMPulseWidthSet}}
\index{PWMPulseWidthSet@{PWMPulseWidthSet}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMPulseWidthSet}]{\setlength{\rightskip}{0pt plus 5cm}void PWMPulseWidthSet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulPWMOut, }
\item[{unsigned long}]{ ulWidth}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga3779960d8c5bcd8d08429e98d80b0c8c}
Sets the pulse width for the specified PWM output.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulPWMOut}]is the PWM output to modify. Must be one of {\bfseries PWM\_\-OUT\_\-0}, {\bfseries PWM\_\-OUT\_\-1}, {\bfseries PWM\_\-OUT\_\-2}, {\bfseries PWM\_\-OUT\_\-3}, {\bfseries PWM\_\-OUT\_\-4}, {\bfseries PWM\_\-OUT\_\-5}, {\bfseries PWM\_\-OUT\_\-6}, or {\bfseries PWM\_\-OUT\_\-7}. \item[{\em ulWidth}]specifies the width of the positive portion of the pulse.\end{DoxyParams}
This function sets the pulse width for the specified PWM output, where the pulse width is defined as the number of PWM clock ticks.

\begin{DoxyNote}{Note}
Any subsequent calls made to this function before an update occurs will cause the previous values to be overwritten.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_ga90d6c30a4f41b6fbdd0e56c95120a2d3}{
\index{pwm\_\-api@{pwm\_\-api}!PWMSyncTimeBase@{PWMSyncTimeBase}}
\index{PWMSyncTimeBase@{PWMSyncTimeBase}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMSyncTimeBase}]{\setlength{\rightskip}{0pt plus 5cm}void PWMSyncTimeBase (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGenBits}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_ga90d6c30a4f41b6fbdd0e56c95120a2d3}
Synchronizes the counters in one or multiple PWM generator blocks.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGenBits}]are the PWM generator blocks to be synchronized. Must be the logical OR of any of {\bfseries PWM\_\-GEN\_\-0\_\-BIT}, {\bfseries PWM\_\-GEN\_\-1\_\-BIT}, {\bfseries PWM\_\-GEN\_\-2\_\-BIT}, or {\bfseries PWM\_\-GEN\_\-3\_\-BIT}.\end{DoxyParams}
For the selected PWM module, this function synchronizes the time base of the generator blocks by causing the specified generator counters to be reset to zero.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__pwm__api_gabf6b675782a44e39a34df4e2b5492727}{
\index{pwm\_\-api@{pwm\_\-api}!PWMSyncUpdate@{PWMSyncUpdate}}
\index{PWMSyncUpdate@{PWMSyncUpdate}!pwm_api@{pwm\_\-api}}
\subsubsection[{PWMSyncUpdate}]{\setlength{\rightskip}{0pt plus 5cm}void PWMSyncUpdate (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulGenBits}
\end{DoxyParamCaption}
)}}
\label{group__pwm__api_gabf6b675782a44e39a34df4e2b5492727}
Synchronizes all pending updates.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the PWM module. \item[{\em ulGenBits}]are the PWM generator blocks to be updated. Must be the logical OR of any of {\bfseries PWM\_\-GEN\_\-0\_\-BIT}, {\bfseries PWM\_\-GEN\_\-1\_\-BIT}, {\bfseries PWM\_\-GEN\_\-2\_\-BIT}, or {\bfseries PWM\_\-GEN\_\-3\_\-BIT}.\end{DoxyParams}
For the selected PWM generators, this function causes all queued updates to the period or pulse width to be applied the next time the corresponding counter becomes zero.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
